import {reqGetCategotyList} from '@/api'
// 三级列表的模块
const state = {
	categoryList:[]  // 初始化数据
};
const getters = {};
const mutations = {
	SET_CATEGORYLIST_STATE(state,payload){
		state.categoryList = payload.categoryList
	}
};
const actions = {
	async getCategoryList ({commit}) {
		const result = await reqGetCategotyList()
		commit('SET_CATEGORYLIST_STATE',{categoryList:result})
	}
};

export default {
	namespaced:true,
	state,
	getters,
	mutations,
	actions
}